package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

//写文件（字节）
public class Demo7 {
    public static void main(String[] args) throws IOException {
        //  不加true 就是覆盖写 ；加了true 就是在原本的基础上续写
        try (OutputStream out = new FileOutputStream("Demo.txt",true)) {
            out.write(97);
            out.write(98);
            out.write(99);
            out.write(100);
        }
    }
}
